package lijunyan;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Database
{
    static public Connection getConnection() throws SQLException
    {
        return DriverManager.getConnection("jdbc:mysql://127.0.0.1/MyDB","javaHomework","javaHomework1");
//      return DriverManager.getConnection("jdbc:sqlserver://127.0.0.1;DatabaseName=MyDB","javaHomework","javaHomework1");
    }
}
